package com.ruoyi.information.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.information.mapper.DroneDetailMapper;
import com.ruoyi.information.domain.DroneDetail;
import com.ruoyi.information.service.IDroneDetailService;

/**
 * 资讯无人机详情详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-25
 */
@Service
public class DroneDetailServiceImpl implements IDroneDetailService 
{
    @Autowired
    private DroneDetailMapper droneDetailMapper;

    /**
     * 查询资讯无人机详情详情
     * 
     * @param id 资讯无人机详情详情主键
     * @return 资讯无人机详情详情
     */
    @Override
    public DroneDetail selectDroneDetailById(Long id)
    {
        return droneDetailMapper.selectDroneDetailById(id);
    }

    /**
     * 查询资讯无人机详情详情列表
     * 
     * @param droneDetail 资讯无人机详情详情
     * @return 资讯无人机详情详情
     */
    @Override
    public List<DroneDetail> selectDroneDetailList(DroneDetail droneDetail)
    {
        return droneDetailMapper.selectDroneDetailList(droneDetail);
    }

    /**
     * 新增资讯无人机详情详情
     * 
     * @param droneDetail 资讯无人机详情详情
     * @return 结果
     */
    @Override
    public int insertDroneDetail(DroneDetail droneDetail)
    {
        droneDetail.setCreateTime(DateUtils.getNowDate());
        return droneDetailMapper.insertDroneDetail(droneDetail);
    }

    /**
     * 修改资讯无人机详情详情
     * 
     * @param droneDetail 资讯无人机详情详情
     * @return 结果
     */
    @Override
    public int updateDroneDetail(DroneDetail droneDetail)
    {
        droneDetail.setUpdateTime(DateUtils.getNowDate());
        return droneDetailMapper.updateDroneDetail(droneDetail);
    }

    /**
     * 批量删除资讯无人机详情详情
     * 
     * @param ids 需要删除的资讯无人机详情详情主键
     * @return 结果
     */
    @Override
    public int deleteDroneDetailByIds(Long[] ids)
    {
        return droneDetailMapper.deleteDroneDetailByIds(ids);
    }

    /**
     * 删除资讯无人机详情详情信息
     * 
     * @param id 资讯无人机详情详情主键
     * @return 结果
     */
    @Override
    public int deleteDroneDetailById(Long id)
    {
        return droneDetailMapper.deleteDroneDetailById(id);
    }
}
